package com.hdax.dm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hdax.dm.common.utils.CommonResponse;
import com.hdax.dm.dtos.user.UserDto;
import com.hdax.dm.entity.user.DmUser;
import com.hdax.dm.exceptions.DmException;

import java.util.Map;

public interface UserLoginService extends IService<DmUser> {

    /**
     * 根据手机号执行登录请求
     *
     * @param phone
     * @return
     */
    CommonResponse<UserDto> login(String phone, String password) throws DmException;

    CommonResponse<UserDto> login(String phone) throws DmException;

    /**
     * 生成验证码
     */
    String generateVCode(String phoneNumber) throws DmException;

    CommonResponse<UserDto> msgLogin(String phoneNumber, String vcode) throws DmException;
}